package com.javafactroy.kunlong.liteflow;

import com.javafactroy.kunlong.batch.User;
import com.yomahub.liteflow.core.NodeComponent;
import org.springframework.stereotype.Component;

@Component("a")
public class ACmp extends NodeComponent {

    @Override
    public void process() {
        //do your business
        System.out.println("执行组件a");
        FlowRequest<User> request = this.getRequestData();
        LiteContext<User> liteContext = this.getContextBean(LiteContext.class);
        liteContext.setData(request.getData());
        liteContext.setId(request.getId());
        liteContext.setRemark(request.getRemark());
    }

    @Override
    public boolean isAccess() {
        return true;
    }
}
